/*
 * ContenedorComprimido.cpp
 *
 *  Created on: 06/12/2009
 *      Author: hernan
 */

#include "ContenedorComprimido.h"

ContenedorComprimido::ContenedorComprimido() {

	this->compressor = new DynamicArithmeticCompresor();
	this->descompressor = new DynamicArithmeticDescompresor();

}

ContenedorComprimido::~ContenedorComprimido() {

	delete this->compressor;
	delete this->descompressor;

}

string ContenedorComprimido::compress(string uncompressData){

	this->compressor->setStringToCompress(uncompressData);

	string compressData;

	compressData = this->compressor->doCompress();

	return compressData;

}

string ContenedorComprimido::uncompress(string compressData){

	this->descompressor->setStringToUncompress(compressData);

	string uncompressData;

	uncompressData = this->descompressor->doUncompress();

	return uncompressData;

}
